<div class="view api-docs">
	<div class="content">
	<? foreach ($api_list as $res): ?>
	<table class="views-table cols-2">
		<caption><a id="<?=$res['resource'];?>"></a><strong><?=ucfirst($res['info']['name']);?></strong><p><?=ucfirst($res['info']['caption']);?></p></caption>
		<thead>
			<tr>
				<th class="views-field views-field-title">Resource</th>
				<th class="views-field views-field-body">Description</th>
			</tr>
		</thead>
		<tbody>
	<?
	   $first = " views-row-first";
	   $last = " views-row-last";
	   foreach ($res["info"]["methods"] as $method => $method_list):

		/* loop GET, POST, PUT, DELETE */
		if ($class == "odd") $class = "even"; else $class = "odd";

		foreach ($method_list as $action=>$info):
			/* loop every action in current method */
		 	if ($class == "odd") $class = "even"; else $class = "odd";

	?>
			<tr class="<?=$class;?>">
				<td class="views-field views-field-title">
					<a href="<?=base_url();?>rest/docs/<?=strtolower($method);?>/<?=$res['resource'];?>/<?=$action;?>"><?=strtoupper($method);?> <?=$res['resource'];?>/<?=$action;?></a>
				</td>
				<td class="views-field views-field-body"><?=$info["desc"];?></td>
			</tr>
	<? endforeach; endforeach; ?>
		</tbody>
	</table>
<? endforeach; ?>
</div>
</div>
<!-- api_listing -->
